{% load i18n mezzanine_tags comment_tags rating_tags %}
<ol class="commentlist">
    {% for comment in comments_for_thread %}

    <li class="comment" id="comment-{{ comment.id }}">
        <div class="avatar icon-overlay icn-link">
            <a href="{{ comment.url }}">
                <img src="{% gravatar_url comment.email %}">
            </a>
        </div><!-- /.avatar -->

        <div class="commentbody">
            {% if not comment.is_removed and comment.is_public or request.user.is_staff %}
            <div class="author">
                {% if comment.url %}
                <h3><a href="{{ comment.url }}">{{ comment.user_name }}</a></h3>
                {% else %}
                <h3>{{ comment.user_name }}</h3>
                {% endif %}
                <div class="meta">
                    <span class="date">{% blocktrans with sometime=comment.submit_date|timesince %}{{ sometime }} ago{% endblocktrans %}</span>
                </div><!-- /.meta -->
            </div><!-- /.author -->

            <div class="message">
                <p>{{ comment.comment|comment_filter }}</p>

                <ul class="meta">
                    <li class="reply"><a href="#reply-{{ comment.id }}">Reply</a></li>
                    <li class="votes">24</li>
                    <li class="upvote"><a href="#"><i class="icon-thumbs-up"></i></a></li>
                    <li class="downvote"><a href="#"><i class="icon-thumbs-down"></i></a></li>
                </ul><!-- /.meta -->

                <form class="comment-reply-form" method="post" id="reply-{{ comment.id }}"
                      action="{{ comment_url }}#reply-{{ comment.id }}"
                      style="display:none;">
                    {% if replied_to == comment.id %}
                    {% fields_for posted_comment_form %}
                    {% else %}
                    {% fields_for unposted_comment_form %}
                    {% endif %}
                    <input type="hidden" name="replied_to" value="{{ comment.id }}">
                    <input class="btn btn-primary btn-lg" type="submit" value="{% trans " reply" %}">
                </form>

            </div><!-- /.message -->
            {% endif %}
        </div><!-- /.commentbody -->
    </li><!-- /.comment -->
    {% endfor %}
</ol><!-- /.commentlist -->

{% if no_comments %}
<p>{% trans "There are currently no comments" %}</p>
{% endif %}

